import http from './request.js'
// 获取轮播图信息
function getBanner(data) {
	return http({
		url: '/jeecg-boot/app/card/carousel/list',
		method: 'GET',
		data: {}
	})
}

// 获取一级菜单list
function getMenulist() {
	return http({
		url: '/jeecg-boot/app/card/categoryOne/list',
		method: 'GET',
		data: {}
	})
}

// 获取品牌列表
function getBrandlist(data) {
	return http({
		url: '/jeecg-boot/app/card/brand/list',
		method: 'GET',
		data,
	})
}


//获取卡总列表
function getCardBrandList(data) {
	return http({
		url: '/jeecg-boot/app/card/cardTyp/list',
		method: 'GET',
		data,
	})
}

//公众号授权登录
function memberLogin(data) {
	return http({
		url: '/jeecg-boot/app/card/member/WxMpLogin',
		method: 'Post',
		data,
	})
}

//获取用户信息
function getMemberInfo(data) {
	return http({
		url: '/jeecg-boot/app/card/member/info',
		method: 'Post',
		data,
	})
}

//上传卡券
function batchAdd(data) {
	return http({
		url: '/jeecg-boot/app/card/card/batchAdd',
		method: 'Post',
		data,
	})
}

//更改用户信息
function memberUpdate(data) {
	return http({
		url: '/jeecg-boot/app/card/member/update',
		method: 'Post',
		data,
	})
}


//更改用户信息（实名认证用这个）
function memberCheck(data) {
	return http({
		url: '/jeecg-boot/app/card/member/check',
		method: 'Post',
		data,
	})
}



//学生认证
function studentUpdate(data) {
	return http({
		url: '/jeecg-boot/app/card/member/student',
		method: 'Post',
		data,
	})
}


//发送验证码
function sendCode(phone) {
	return http({
		url: '/jeecg-boot/app/card/member/sms/' + phone + '/2',
		method: 'GET',
	})
}


//绑定手机号
function memberBindPhone(data) {
	return http({
		url: '/jeecg-boot/app/card/member/bing',
		method: 'Post',
		data,
	})
}


//查询卡券列表
function cardList(data) {
	return http({
		url: '/jeecg-boot/app/card/card/Page',
		method: 'GET',
		data,
	})
}

//查询卡券详情
function cardDetail(data) {
	return http({
		url: '/jeecg-boot/app/card/card/queryById',
		method: 'GET',
		data,
	})
}



//获取用户账户余额
function memberBalance(data) {
	return http({
		url: '/jeecg-boot/app/card/member/balance',
		method: 'GET',
		data,
	})
}


//获取用户交易明细
function walletFlow(data) {
	return http({
		url: '/jeecg-boot/app/card/walletFlow/list',
		method: 'GET',
		data,
	})
}

// 绑定上级
function bindInvite(code) {
	return http({
		url: '/jeecg-boot/app/card/member/invite?code=' + code,
		method: 'Post',

	})
}

// 绑定上级
function getJunior() {
	return http({
		url: '/jeecg-boot/app/card/member/junior',
		method: 'get',

	})
}


// 获取出单排行

function getorderRanking(data) {
	return http({
		url: '/jeecg-boot/app/card/card/orderRanking',
		method: 'get',
		data

	})
}

// 获取交易排行
function getTradeCount(data) {
	return http({
		url: '/jeecg-boot/app/card/card/tradeCount',
		method: 'get',
		data

	})
}
//邀请排行
function inviteRanking(data) {
	return http({
		url: '/jeecg-boot/app/card/card/inviteRanking',
		method: 'get',
		data

	})
}
//提现
function withdraw(data) {
	return http({
		url: '/jeecg-boot/app/card/member/withdraw',
		method: 'post',
		data

	})
}

function confirmWithdraw(data) {
	return http({
		url: '/jeecg-boot/app/card/member/confirmWithdraw?orderNo=' + data,
		method: 'get',

	})
}

// 获取签名
function getTicket(data) {
	return http({
		url: '/jeecg-boot/app/card/member/getTicket',
		method: 'get',
		data
	})
}


// 获取签名
function queryCountPageList(data) {
	return http({
		url: '/jeecg-boot/app/card/cardTyp/queryCountPageList',
		method: 'get',
		data
	})
}

// 三个小彩条
function homeCount() {
	return http({
		url: '/jeecg-boot/app/card/member/homeCount',
		method: 'get',
	})
}


// 累积到帐、收益
function homeWalletCount() {
	return http({
		url: '/jeecg-boot/app/card/member/homeWalletCount',
		method: 'get',
	})
}
















export {
	getBanner,
	getMenulist,
	getBrandlist,
	getCardBrandList,
	memberLogin,
	getMemberInfo,
	batchAdd,
	memberUpdate,
	studentUpdate,
	sendCode,
	memberBindPhone,
	cardList,
	memberBalance,
	walletFlow,
	cardDetail,
	bindInvite,
	getJunior,
	getorderRanking,
	getTradeCount,
	inviteRanking,
	withdraw,
	memberCheck,
	getTicket,
	confirmWithdraw,
	queryCountPageList,
	homeCount,
	homeWalletCount
}